package com.unicomcz.mobile;

import java.sql.ResultSet;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.unicomcz.DetailPageAction;
import com.unicomcz.article.Article;
import com.unicomcz.login.UserInfo;

public class getDeptByName extends DetailPageAction {
	private String deptName; 
	//protected int rowPerpage = 2000;
	public String getDeptName() {
		return deptName;
	}
	
	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}
	
	public String getSqlStr() {
		
        String sqlStr="SELECT depart_id,depart_name from dls_code_dls where depart_name like '%"+deptName +"%'"; 
        
        log.debug(sqlStr);
        return sqlStr;
    }
    public Object[] getParams() {
        return new Object[]{};	
    }
    protected void regQueryParam() throws Exception{
    }
    protected void rs2List(ResultSet rs,List out) throws Exception{
        DeptBean a = new DeptBean();
        a.setDepartId(rs.getString(1));
        a.setDeptName(rs.getString(2));
        out.add(a);
        
    }

}
